{% extends "layout.html" %}
{% block content %}
    <fieldset class="layui-elem-field layui-field-title">
        <legend>编辑靓号使用ModelForm</legend>
    </fieldset>
    <form class="layui-form" method="post" novalidate autocomplete="off">
        {% csrf_token %}
        <!--      {{form}}-->
        <!--      <hr />-->
        <!--      {{form.name.label}}：{{form.name}}-->
        <!--      {{form.password.label}}：{{form.password}}-->
        <!--      {{form.age.label}}：{{form.age}}-->
        <!--      <hr />-->
        <!--      {% for field in form %}-->
        <!--        {{field.label}} : {{field}}-->
        <!--      {% endfor %}-->
        {% for field in form %}
        <div class="layui-form-item">
            <label class="layui-form-label">{{field.label}}</label>
            <div class="layui-input-block">
                {{field}}
                <span class="layui-font-red">
            {{field.errors.0}}
          </span>
                <!--          <input type="text" name="name" lay-verify="required" placeholder="请输入姓名" autocomplete="off" class="layui-input">-->
            </div>
        </div>
        {% endfor %}
        <div class="layui-input-block">
            <button type="submit" class="layui-btn" lay-submit lay-filter="demo1">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </form>
{% endblock %}